<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%
	String contextPath = request.getContextPath();
%>  
<style type="text/css">
	ul,ol,li {list-style:none;}
	li {display:inline;}
</style>
<form action="<%=contextPath %>/eventBoard/list.do" name="search" method="get" onsubmit="return searchCheck()">
<!-- //Wrapper -->
<div id="wrapper">	
<!-- Contenter_Sub -->
<div id="container_sub">
<!-- Content_List -->
<div id="sub_page_bg4"></div>
<!-- Sub Page Background -->
		
<div id="content_list">
<div class="title">
						
<div class='sub_title'>
	<ul>
		<li>파티&미팅</li>
		<li class='stitle'>당신의 이상형을 만나라!!</li>
	</ul>
</div>

<div class='navig'>
<ul>
<li class='frst'><img src='../image/all/home_icon.png' width='13' height='13'><a href='<%=contextPath %>/main/index.do'>HOME</a></li>
<li>회원서비스</li>
<li>파티&미팅</li>
</ul></div>

<!-- sub_menu-->
<ul class="sub_menu">		
	<ul class="sub_tab">
		<li><a class='rollover' href="<%=contextPath%>/propose/write.do">프로포즈</a></li>
		<li><a class='rollover' href="<%=contextPath%>/propose/search.do">이상형찾기</a></li>
		<li><a class='rollover' href="<%=contextPath %>/recommend/allList.do">회원현황</a></li>		
		<li><a class='over' href="<%=contextPath %>/eventBoard/list.do">파티&미팅</a></li>
		<li><a class='rollover' href="<%=contextPath %>/dcourseBoard/list.do">데이트코스</a></li>
	  </ul>
</ul>	
			
<!-- class title div끝 -->
</div>

	
<!-- 게시판 목록 시작 { -->

<div id="event_list">
    <!--총 글건수랑 현재 페이지-->
    <div class="bo_fx">
        <div id="bo_list_total">
            <span>Total${count}건</span>
            ${currentPage}페이지 
        </div>
        <c:if test="${!empty sessionId && membership == 9}">
            <ul class="btn_bo_user" style="float:right">
            	<li><a href="<%=contextPath %>/eventBoard/write.do" class="btn_b02">글쓰기</a></li> 
            </ul>     
        </c:if>
    </div>
     

<c:forEach var="article" items="${list}">
      <details class="sub_10_3_faq_q">
      	<summary class="sub_10_2_faq_q">
      	 	<span id="number">${number}.</span><span id="t_name">Tiket Name</span>${article.title}
      	</summary>
     	    <c:set var="number" value="${number-1}"/>
      		<table id="tbl_ticket">
      			<tr>
      			    <c:if test="${article.limit_Ticket > 0}">
	    				<td width="300" rowspan="5" id="ticket_img_limit1">
      						<img src="/wedding/upload/${article.filename}" width="100%" height="150">
      					</td>
	    			</c:if>
	    			<c:if test="${article.limit_Ticket == 0}">
	    				<td width="300" 	rowspan="5" background="/wedding/upload/${article.filename}" id="ticket_img_limit2">
      						SOLD OUT
      					</td>
	    			</c:if>
      				<th width="70"> 
      					파티날짜
      				</th>
      				<td colspan="2">
      					${article.mdate}
      				</td>
    			</tr>
    			<tr>
	    			<th>
	    				<span>판매일시</span>
	    			</th>
	    			<td colspan="2">
	    				${article.start_Date} <span>~</span>  ${article.end_Date}
	    			</td>
    			</tr>
	    		<tr>
	    			<th>
	      				가격
	      			</th>
	    			<td colspan="2">
	    				${article.ticket_Price}
	    			</td>
	    		</tr>
	    		<tr>
	    			<th>
	    				남은 수량
	    			</th>
	    			<td>
	    				${article.limit_Ticket}
	    			</td>
	    			
	    			<c:if test="${!empty sessionId && membership != 9 && article.limit_Ticket > 0}">
	    				<td rowspan="2" style="text-align:right; vertical-align: bottom;">
	      					<input type="button" value="구매" class="btn_ticket" onclick="location.href='purchase.do?num=${article.num}'">
	    				</td>
	    			</c:if>
	    			<c:if test="${!empty sessionId && membership == 9}">
	    				<td rowspan="2" style="text-align:right; vertical-align: bottom;">
	    					<input type="button" value="수정" class="btn_ticket" onclick="location.href='update.do?num=${article.num}'">
	      					<input type="button" value="삭제" class="btn_ticket" onclick="location.href='delete.do?num=${article.num}'">
	    			</td>
	    			</c:if> 
	    		</tr>
	    		<tr>
	    			<th>
	    				장소
	    			</th>
	    			<td>
	    				${article.place}
	    			</td>
	    		</tr>
	      	<!-- 	<tr>
	      			<td colspan="3" style="text-align:right">
	      				<input type="button" value="구매" class="btn_ticket" onclick="location.href=''">
	      			</td>
	      		</tr> -->
      		</table>
     	 </details>
	</c:forEach>

<!-- 페이징처리 -->
<table>
<c:if test="${count > 0}">
<nav class="pg_wrap">

	<span class="pg">
	${pagingHtml} </span>
	  
</nav>
</c:if>
</table>
<!-- 게시판 검색 시작 { -->
<fieldset id="bo_sch" >
  <!-- <legend>게시물 검색</legend>
      <label for="sfl" class="sound_only">검색대상</label>
    
  <select name="keyField" id="sfl">
        <option value="all">전체</option> 
        <option value="title">제목</option>
        <option value="writer">글쓴이</option>  
        </select>
   <label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
   <input type="text" name="keyWord" value="" required id="stx"  class="frm_input required" size="15" maxlength="15">
   <input type="submit" value="검색" class="btn_submit">  -->
</fieldset>
		<!-- <div id="blank">&nbsp;</div> -->
		</div>
		<!-- //content_list -->

	</div>
	<!-- //contenter_sub -->

</div>
<!-- //wrapper -->
</div>
<hr>
</form>
